/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 刘远望
 * Date: 2025-05-15
 * Time: 18:07
 */
class Solution {
    public void moveZeroes(int[] nums) {
        int cur = 0;
        int desc = -1;
        while (cur < nums.length) {
            if (nums[cur] == 0) {
                cur++;
            }else {
                int tmp = nums[desc + 1];
                nums[desc + 1]= nums[cur];
                nums[cur] = tmp;
                cur++;
                desc++;
            }
        }

    }
}